package cn.edu.cqvie.atc.loop;

/**
 * 递归
 */
public class Recursion {


    public static void main(String[] args) {
        test2(2);
        try {
            Thread.sleep(1000000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }


    public static void test() {
        System.out.println("Hello, World!");
        test();
    }

    public static void test2(int n) {
        if (n == 0) {
            return;
        }
        System.out.println(n);
        test2(n - 1);
    }
}
